<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>用戶列表</title>
</head>
<body>
	<table border="1" align="center">
		<tr>
			<td>商品ID</td>
			<td>商品名</td>
			<td>商品描述</td>
			<td>剩余商品</td>
			<td>商品价格</td>
			<td>操作</td>
		</tr>
		<c:forEach items="${products}" var="product">
			<tr>
				<td>${product.id}</td>
				<td>${product.name}</td>
				<td>${product.description}</td>
				<td>${product.remaining}</td>
				<td>${product.price}</td>
				<td>
					<a href="">购买</a>
					<a href="">评价</a>
				</td>
			</tr>
			
		</c:forEach>
	</table>
</body>
</html>